//
//  MessageTableViewCell.m
//  easemob(环信)
//
//  Created by 郭亚 on 16/4/28.
//  Copyright © 2016年 郭亚. All rights reserved.
//

#import "MessageTableViewCell.h"

@implementation MessageTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        _friendName = [UILabel new];
        _friendName.textColor = [UIColor orangeColor];
        [self.contentView addSubview:_friendName];
        
        _content = [UILabel new];
        _content.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_content];

    }
    return self;
}

- (void)layoutSubviews
{
    _friendName.frame = CGRectMake(5, 5, self.contentView.frame.size.width / 4 - 5, self.contentView.frame.size.height - 10);
    _content.frame = CGRectMake(CGRectGetMaxX(_friendName.frame) + 5, _friendName.frame.origin.y, self.contentView.frame.size.width  - _friendName.frame.size.width - 5, _friendName.frame.size.height);
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
